<div class="page company">
    <div class="action-bar">
        <div class="row">
                <div class="col-sm-8">
                    <form>
                        <div class="row">
                            <div class="col-sm-4">
                                <input type="text" class="form-control"
                                       placeholder="请输入查询条件"
                                       ng-model="query"/>
                            </div>
                            <div class="col-sm-4">
                                <button class="btn btn-primary" ng-click="searchLogistics()">
                                    查询
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="col-sm-4">
                    <button class="btn btn-success pull-right" ng-click="addLogistics()">
                        增加运输公司
                    </button>
                </div>
            </div>
        </div>


    <div class="panel page-content">
        <div ng-if="logistics.length<=0" class="nodata"></div>
        <table class="table table-hover" ng-if="logistics.length>0">
            <thead>
            <tr>
                <th >公司名</th>
                <th >地址</th>
                <th >用户名</th>
                <th >联系人</th>
                <th >电话</th>
                <th >操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="l in logistics">
                <td >{{l.companyName}}</td>
                <td>
                    {{l.address}}
                </td>
                <td >
                    {{l.userId}}
                </td>
                <td >
                    {{l.contactName}}
                </td>
                <td >
                    {{l.contactPhone}}
                </td>
                <td >
                    <button class="btn btn-primary btn-md" ng-click="updateLogistics(l)">编辑</button>
                    <button class="btn btn-danger btn-md" ng-click="deleteLogistics(l)">删除</button>
                </td>
            </tr>
            </tbody>
        </table>
    <div class="text-center">
        <pagination total-items="pager.totalItems" ng-model="pager.pageNo"
                    ng-if="pager.totalItems>pager.pageSize"
                    items-per-page="pager.pageSize" ng-change="getLogistics()"
                    previous-text="上一页" next-text="下一页" max-size="3"></pagination>
    </div>
</div>
</div>
